package com.yunji.runner;

import com.yunji.order.business.delay.RedissonQueue;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextClosedEvent;
import org.springframework.stereotype.Component;

/**
 * @Project: yunji-coffee
 * @Package: com.yunji.runner
 * @Title: ExistingListener
 * @Description: 程序退出监听器
 * History:
 * Date						Version			Author			Summary
 * ========================================================================
 * 2024-04-20 17:58:13		V1.0			HuaAo		新建类
 */
@Component
public class ExistingListener implements ApplicationListener<ContextClosedEvent> {
    @Override
    public void onApplicationEvent(ContextClosedEvent event) {
        RedissonQueue.stop = true;
    }
}